import React from "react";
import View from "../base/View";
import defaultData from "./data";
import { WeaDatePicker } from "ecCom";
import './View.less';

export default class DateView extends View {
  renderForPC(data, value) {
    return (
      <WeaDatePicker ecId={`${this && this.props && this.props.ecId || ''}_WeaDatePicker@yr3oi1`}
        value={value}
        onChange={this.handleValueChange}
      />
    );
  }

  renderForMobile(data, value) {
    return (
      <div>
        <input type='date' value={value} onChange={this.handleValueChangeForNE} />
      </div>
    );
  }
}

DateView.defaultProps = {
  data: defaultData
};